how to use legend to create multiple lines in line chart